home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / WebObjects / SourceCode / CalendarRadio.wo / CalendarRadioExample / CalendarRadioEx.wos < prev   
Text File  |  1996-04-19  |  2KB  |  112 lines

  1. ////////////////////////
  2. //  CalendarRadio
  3. //  by Charles Lloyd
  4. ////////////////////////
  5.  
  6.  
  7. persistent id userYear;
  8. persistent id userMonth;
  9. persistent id userDayChoice;
  10.  
  11. persistent id userCellPadding;
  12. persistent id userCellSpacing;
  13. persistent id userTableBorder;
  14. persistent id userYearFontSize;
  15. persistent id userMonthFontSize;
  16. persistent id userDayFontSize;
  17. persistent id userShowButtons;
  18. persistent id userShowButtonsChecked;
  19. persistent id userCellAlignment;
  20.  
  21. //This is only for the input fields for this lab
  22. id inputCellSize;
  23. id alignmentStrings;
  24.  
  25. - awake
  26. {
  27.     if (!userYear) {
  28.         userYear = 1969;
  29.         userMonth = 5;
  30.         userDayChoice = 13;
  31.  
  32.         userCellPadding = 0;
  33.         userCellSpacing = 0;
  34.         userTableBorder = 1;
  35.         userYearFontSize = 4;
  36.         userMonthFontSize = 5;
  37.         userDayFontSize = 3;
  38.         [self setUserShowButtonsChecked:YES];
  39.         userCellAlignment=@"Left";
  40.     }
  41.     alignmentStrings = @("Left", "Center", "Right");
  42.     inputCellSize=7;
  43. }
  44.  
  45. - displayChoice
  46. {
  47.     id aPage = [WOApp pageWithName:@"CalendarResult"];
  48.     [aPage setDayChoiceString:userDayChoice];
  49.     return aPage;
  50. }
  51.  
  52. - setUserDayChoice:aString
  53. {
  54.     userDayChoice = [aString intValue];
  55. }
  56.  
  57. - reconfigureCalendar
  58. {
  59.     return self;
  60. }
  61.  
  62. - setUserYear:aString
  63. {
  64.     userYear = [aString intValue];
  65. }
  66.  
  67. - setUserMonth:aString
  68. {
  69.     userMonth = [aString intValue];
  70. }
  71.  
  72. - setUserCellPadding:aString
  73. {
  74.     userCellPadding = [aString intValue];
  75. }
  76.  
  77. - setUserCellSpacing:aString
  78. {
  79.     userCellSpacing = [aString intValue];
  80. }
  81.  
  82. - setUserTableBorder:aString
  83. {
  84.     userTableBorder = [aString intValue];
  85. }
  86.  
  87. - setUserYearFontSize:aString
  88. {
  89.     userYearFontSize = [aString intValue];
  90. }
  91.  
  92. - setUserMonthFontSize:aString
  93. {
  94.     userMonthFontSize = [aString intValue];
  95. }
  96.  
  97. - setUserDayFontSize:aString
  98. {
  99.     userDayFontSize = [aString intValue];
  100. }
  101.  
  102. - setUserShowButtonsChecked:aBool
  103. {
  104.     userShowButtonsChecked = aBool;
  105.     if (userShowButtonsChecked) {
  106.         userShowButtons = aBool;
  107.     } else {
  108.         userShowButtons = nil;
  109.     }
  110. }
  111.  
  112.